module.exports = function(window, document) {
	var apivm = require('../../common/avm.min')(window, document);
	var avm = apivm;
	var api = apivm.api;
	var Component = apivm.Component;
	var $ = apivm.$;
	(function() {
	var Me = /*@__PURE__*/ (function(Component) {
		function Me(props) {
			Component.call(this, props);
			this.data = {
				user: "老陈",
				isVip: "normal" //vip/svip
			};
		}

		if (Component) Me.__proto__ = Component;
		Me.prototype = Object.create(Component && Component.prototype);
		Me.prototype.constructor = Me;
		Me.prototype.apiready = function() {};
		Me.prototype.setVip = function() {
			this.data.isVip = "vip";
		};
		Me.prototype.setSvip = function() {
			this.data.isVip = "svip";
		};
		Me.prototype.setNormal = function() {
			this.data.isVip = "normal";
		};
		Me.prototype.render = function() {
			return apivm.h(
				"view",
				{class: "page"},
				apivm.h("view", null, this.data.user),
				apivm.h(
					"view",
					{
						style: {display: this.data.isVip == "normal" ? "flex" : "none"},
						class: "tag normal"
					},
					"充值"
				),
				apivm.h(
					"view",
					{
						style: {display: this.data.isVip == "vip" ? "flex" : "none"},
						class: "tag vip"
					},
					"VIP"
				),
				apivm.h(
					"view",
					{
						style: {display: this.data.isVip == "svip" ? "flex" : "none"},
						class: " tag svip"
					},
					"SVIP"
				),

				this.data.isVip == "normal"
					? apivm.h("view", {class: "tag normal"}, "充值")
					: this.data.isVip == "vip"
					? apivm.h("view", {class: "tag vip"}, "VIP")
					: apivm.h("view", {class: " tag svip"}, "SVIP"),

				apivm.h("view", null, "充值区"),
				apivm.h("button", {onClick: this.setVip}, "充值会员"),
				apivm.h("button", {onClick: this.setSvip}, "充值超级会员"),
				apivm.h("button", {onClick: this.setNormal}, "退费")
			);
		};

		return Me;
	})(Component);
	apivm.define("me", Me);
	apivm.render(apivm.h("me", null), "body");
})();

	window['createApp'] = function() {
		apivm.$_start();
	}
	return avm;
}